﻿<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
<title>Web剪刀手</title>
<link rel="stylesheet" type="text/css" href="options.css"/>
<link rel="shortcut icon" href="logo_32.png" type="image/x-icon" /> 
<style type='text/css'>
	a {
		font-size: 12px;
		color: #034B81;
		text-decoration: none;
	}
	a:hover {
		text-decoration: none;
	}
	.lineBlock
	{
		margin-bottom: 3px;
		padding-bottom:3px;
	}
	.wordTitle
	{
		background-color: #F4F6FC;
		padding-bottom:3px;
		padding-top:3px;
	}
	.keyWord
	{
		display: inline;
		font-weight: bold;
		font-size: 16px;
	}
	.opBtn
	{
		display: inline;
		float: right;
		padding-left: 15px;
	}
	textarea {
	width: 100%;
	padding: 5px;
	font-family: Tahoma, sans-serif;
	}
</style>
<script type="text/javascript" src="newwords.js"></script>
<script> 
/* util script start*/
function $(element) {
  if (typeof element == 'string')
   return document.getElementById(element);
}
var db=new DB_article();

window.onload = function(){
	db.init();
} 

function ReadJSON(){
	var elm = $('div_words');
	var strJSON = elm.value;
	if(strJSON.length<=10)
	{
		alert("数据格式错误");
		return;
	}
	var data = JSON.parse(strJSON);
	if(!data || data.length<=0)
	{
		alert("数据格式错误");
		return;
	}
	for(var i=0;i<data.length;i++)
	{
		var w = data[i];
		db.AddRow(w.title,w.body,w.pageUrl,w.addTime);
	}
	alert("已保存：" + data.length + "条记录。");
	elm.value = "";
}
</script>
</head>
<body>
	<div id="debug"></div>
    <div id="main_container">
        <table width="90%" valign="top" align="center">
            <tr>
                <td align="left">
                    <h1><img src="logo.png" width="30" />Web剪刀手</h1>
                </td>
                <td align="right">
                    <p>
                        <a href="./remember.htm" target="_blank">首页</a> | <a href="http://code.google.com/p/webclip/"
                            target="_blank">Web剪刀手</a></p>
                </td>
            </tr>
        </table>
        <table cellpadding="5" class="settings-table">
            <tr>
                <td valign="top" width="75%">
					恢复数据：请将此前导出的数据拷贝到这里，然后点击<input type="button" onclick="ReadJSON()" value="导入"/>
					<textarea class="text" name="comment" rows="30" id="div_words"></textarea> 
                </td>
                <td valign="top" width="15%">
                    <div id="div_tags">
                    </div>
                </td>
            </tr>
        </table>
</body>
</html>